﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleTesrt.GameTestIOC
{
    /// <summary>
    /// 铁剑
    /// </summary>
    internal class IronSword : ISword
    {

        public Random rom = new Random();
        /// <summary>
        /// 铁剑每次只能伤害50滴血
        /// </summary>
        /// <param name="guai"></param>
        public void AttrackExec(Guai guai)
        {
            Int32 loss = (rom.NextDouble() < 0.5) ? 100 : 200;
            if (loss==200)
                Console.WriteLine("出现暴击");



            guai.Attrack(loss);
        }
    }
}
